<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: Group</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: Group</h1>

    




<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="SPE.html">SPE</a>.</span>
        
        Group
        </h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    <h4 class="name" id="Group"><span class="type-signature"></span>new Group<span class="signature">(options)</span><span class="type-signature"></span></h4>

    



<div class="description">
    The SPE.Group class. Creates a new group, containing a material, geometry, and mesh.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#GroupOptions">GroupOptions</a></span>


            
            </td>

            

            

            <td class="description last">A map of options to configure the group instance.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line60">line 60</a>
    </li></ul></dd>
    

    

    

    
</dl>
















    
    </div>

    

    

    

     

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id="addEmitter"><span class="type-signature"></span>addEmitter<span class="signature">(emitter)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Adds an SPE.Emitter instance to this group, creating particle values and
assigning them to this group's shader attributes.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>emitter</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#Emitter">Emitter</a></span>


            
            </td>

            

            

            <td class="description last">The emitter to add to this group.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line308">line 308</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="addPool"><span class="type-signature"></span>addPool<span class="signature">(numEmitters, emitterOptions, createNew)</span><span class="type-signature"> &rarr; {<a href="global.html#Group">Group</a>}</span></h4>

    



<div class="description">
    Add a pool of emitters to this particle group
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>numEmitters</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">The number of emitters to add to the pool.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>emitterOptions</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#EmitterOptions">EmitterOptions</a></span>
|

<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">An object, or array of objects, describing the options to pass to each emitter.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>createNew</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">Should a new emitter be created if the pool runs out?</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line544">line 544</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    This group instance.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#Group">Group</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="dispose"><span class="type-signature"></span>dispose<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#Group">Group</a>}</span></h4>

    



<div class="description">
    Dipose the geometry and material for the group.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line743">line 743</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    Group instance.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#Group">Group</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="getFromPool"><span class="type-signature"></span>getFromPool<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#Emitter">Emitter</a>|null}</span></h4>

    



<div class="description">
    Fetch a single emitter instance from the pool.
If there are no objects in the pool, a new emitter will be
created if specified.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line487">line 487</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#Emitter">Emitter</a></span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="getPool"><span class="type-signature"></span>getPool<span class="signature">()</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Get the pool array
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line530">line 530</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="releaseIntoPool"><span class="type-signature"></span>releaseIntoPool<span class="signature">(emitter)</span><span class="type-signature"> &rarr; {<a href="global.html#Group">Group</a>}</span></h4>

    



<div class="description">
    Release an emitter into the pool.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>emitter</code></td>
            

            <td class="type">
            
                
<span class="param-type">ShaderParticleEmitter</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line510">line 510</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    This group instance.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#Group">Group</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="removeEmitter"><span class="type-signature"></span>removeEmitter<span class="signature">(emitter)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Removes an SPE.Emitter instance from this group. When called,
all particle's belonging to the given emitter will be instantly
removed from the scene.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>emitter</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#Emitter">Emitter</a></span>


            
            </td>

            

            

            <td class="description last">The emitter to add to this group.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line422">line 422</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="tick"><span class="type-signature"></span>tick<span class="signature">(dt<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Simulate all the emitter's belonging to this group, updating
attribute values along the way.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>dt</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    Group's `fixedTimeStep` value
                
                </td>
            

            <td class="description last">The number of seconds to simulate the group's emitters for (deltaTime)</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line673">line 673</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id="triggerPoolEmitter"><span class="type-signature"></span>triggerPoolEmitter<span class="signature">(numEmitters, position<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="global.html#Group">Group</a>}</span></h4>

    



<div class="description">
    Set a given number of emitters as alive, with an optional position
vector3 to move them to.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>numEmitters</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The number of emitters to activate</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>position</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">A THREE.Vector3 instance describing the position to activate the emitter(s) at.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core_SPE.Group.js.html">core/SPE.Group.js</a>, <a href="core_SPE.Group.js.html#line610">line 610</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    This group instance.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#Group">Group</a></span>


    </dd>
</dl>

    



        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="SPE.Emitter.html">Emitter</a></li><li><a href="SPE.Group.html">Group</a></li><li><a href="SPE.ShaderAttribute.html">ShaderAttribute</a></li><li><a href="SPE.TypedArrayHelper.html">TypedArrayHelper</a></li></ul><h3>Namespaces</h3><ul><li><a href="SPE.html">SPE</a></li><li><a href="SPE.utils.html">utils</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.3</a> on Sat Nov 14 2015 15:30:50 GMT+0000 (GMT)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>